package com.itheima.example;

import java.io.*;

public class Example11 {
    public static void main(String[] args) throws Exception {
        File folder = new File("d:/hello");
        File[] files = folder.listFiles();
        for (File file : files) {
            if (file.getName().endsWith(".java")) {
                file.delete();
            }
        }
    }
}
